import request from '@/utils/request'
// -------------登录------------

// 获取验证码
export const getOrderListApi = (data) => {
    return request({
        url: `/captchaMobile?mobile=${data}`,
        method: 'post',
        // data
    })
}

// 没注册时自动注册
export const getmobileRegisterApi = (data) => {
    return request({
        url: `mobileRegister`,
        method: 'post',
        data
    })
}

// 验证短信验证码
export const getVerificationCodeApi = (data) => {
    return request({
        url: `verificationCode`,
        method: 'post',
        data
    })
}

// 密码登录
export const getLoginApi = (data) =>{
    return request({
        url: `login`,
        method: 'post',
        data
    })
}

// 找回密码 /system/user/profile/retrievePwd
export const getUserProfileRetrievePwdApi = (data) =>{
    return request({
        url: `/system/user/profile/retrievePwd`,
        method: 'post',
        data
    })
}

// 发送邮箱验证码
export const getEmailCodeApi = (email) => {
    return request({
        url: `emailCode?email=${email}`,
        method: 'post',

    })
}

// 发送邮箱验证码
export const getVerificationMailCodeApi = (data) => {
    return request({
        url: `verificationMailCode`,
        method: 'post',
        data
    })
}

// 注册账号  /system/user/register
export const getUserRegisterApi = (data) =>{
    return request({
        url: `/system/user/register`,
        method: 'post',
        data
    })
}

// 获取下载应用的信息
export const getApplicationListApi = (params)=>{
    return request({
        url: `/base/appVer/selectAppVerByNewest`,
        method: 'get',
        params
    })
}

// 注销改账号 /cancellation
export const deleteCancellationApi = () =>{
    return request({
        url: `/cancellation`,
        method: 'delete',
    })
}

// 获取当前问圈 /service/circle/currentCircleLogo
export const getCurrentCircleLogoApi = (params)=>{
    return request({
        url: `/service/circle/currentCircleLogo`,
        method: 'get',
        params
    })
}


// 创建登录二维码
export const createLoginQrcodeApi = (data) => {
    return request({
        url: `/createLoginQrcode`,
        method: 'post',
        data
    })
}

// 查询扫码登录状态
export const qrcodeLoginApi = (data) => {
    return request({
        url: `/qrcodeLogin`,
        method: 'post',
        data
    })
}